<?php 
namespace Phpcmf\Controllers;


class Fabu extends \Phpcmf\Home\Module
{
    
    public function fabuid() {
       //图标 thumb
		$tubiao = \Phpcmf\Service::M()->db->table('field')->where('name', '知识缩略图')->where('fieldname', 'thumb')->where('relatedname', 'module')->where('fieldtype', 'File')->get()->getRowArray();
		$neirong_tu = \Phpcmf\Service::M()->db->table('field')->where('name', '内容图')->where('fieldname', 'neirongtu')->where('relatedname', 'module')->where('fieldtype', 'Files')->get()->getRowArray();
		$yinpin = \Phpcmf\Service::M()->db->table('field')->where('name', '音频')->where('fieldname', 'yinpin')->where('relatedname', 'mform-zhishi')->where('fieldtype', 'Files')->get()->getRowArray();
		$yinpintu = \Phpcmf\Service::M()->db->table('field')->where('name', '音频图片')->where('fieldname', 'tupian')->where('relatedname', 'mform-zhishi')->where('fieldtype', 'Files')->get()->getRowArray();
		
        $dataid=[
            'thumb'=> $tubiao['id'], //知识缩略图
            'neirongtu'=> $neirong_tu['id'], //知识内容图片
            'yinpin'=> $yinpin['id'], //音频
            'yinpintu'=> $yinpintu['id'], //音频图片
        ];
        
        $rt=[
			'code'=>1,
		    'msg'=>'发布id',
			'data'=>$dataid,
		];
		return $this->_json($rt['code'], $rt['msg'], $rt['data']);
        
    }
    
	
}